class CreateTeams < ActiveRecord::Migration
  def self.up
    create_table :teams do |t|
        t.column :name, :string, :limit => 80, :unique => true, :null => false
        t.column :password, :string, :limit => 80, :default => ""
        t.column :is_admin, :boolean, :default => false
        t.column :is_grading, :boolean, :default => false
    end

    Team.create(
        :name     => "admin", 
        :password => "l33t",
        :is_admin => "true"
    )

    Team.create(
        :name     => "player",
        :password => "foobar"
    )

  end

  def self.down
    drop_table :teams
  end
end
